﻿using System;
using System.Collections.Generic;
using System.Reflection;
using Abp.Localization;
using Abp.Localization.Dictionaries;
using Abp.Localization.Dictionaries.Xml;
using Abp.Localization.Sources;
using Abp.Modules;


namespace XHD.WXZJ
{
    public class WXZJLocalizationModule:AbpModule
    {
        public override void PreInitialize()
        {
           
            //添加或者删除 本地化资源
            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    WXZJConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        "XHD.WXZJ.Localization.Source"
                        )
                    )
                );
        }

        public override void Initialize()
        {
           IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}
